<?php

namespace App\Services;

use App\Models\AiApp;
use Slowlyo\OwlAdmin\Services\AdminService;

/**
 * 客户端管理
 *
 * @method AiApp getModel()
 * @method AiApp|\Illuminate\Database\Query\Builder query()
 */
class AiAppService extends AdminService
{
	protected string $modelName = AiApp::class;

	public function searchable($query)
	{
		parent::searchable($query);

		$query->when($this->request->input('app_key'), fn($q) => $q->where('app_key', 'like', '%' . $this->request->input('app_key') . '%'));
	}
}